package com.xuhuan.example.example061;

/**
 * @author: huan.xu
 * @create: 2023/11/14 10:39
 * @description: 矩形
 **/
public class Rectangle extends Shape {
    private double length;
    private double width;

    public Rectangle(double length, double width) {
        this.length = length;
        this.width = width;
    }

    /**
     * 获取面积
     *
     * @return
     */
    @Override
    public double getArea() {
        return length * width;
    }
}
